package com.ruoyi.framework.security.token;

import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

public class PhoneAuthToken extends UsernamePasswordAuthenticationToken {

    private final Integer userType;

    public PhoneAuthToken(Object principal, Object credentials,Integer userType) {
        super(principal, credentials);
        this.userType = userType;
    }

    public PhoneAuthToken(Object principal, Object credentials,
                          Collection<? extends GrantedAuthority> authorities,Integer userType) {
        super(principal, credentials, authorities);
        this.userType = userType;
    }

    public Integer getUserType() {
        return userType;
    }
}